//
//  GetUserViewController.m
//  uniquelove
//
//  Created by ibokan on 14-12-10.
//  Copyright (c) 2014年 ibokan. All rights reserved.
//

#import "GetUserViewController.h"
#import "AFNetworking.h"
@interface GetUserViewController ()

@end

@implementation GetUserViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

/*
 {
 backgroundimage = "";
 deviecToken = "";
 id = 1256;
 name = "\U6728\U7ef4\U5e0c";
 relation = 2056483717;
 relationid = 2038;
 sex = 1;
 tel = "";
 token = "2.00qcm7IC1PogdB8acff521c90XDnfB";
 uid = 1956859800;
 userImage = "http://lovemyqq-lovemyqq.stor.sinaapp.com/1418268234pin.png";
 },
 {
 success = 0;
 }
 
 
 
 
 
 inszh@163.com  ---    m9a7k5j4.
 
 
 backgroundimage = "";
 deviecToken = "";
 id = 1335;
 name = "";
 relation = "<null>";
 relationid = 2038;
 sex = "";
 tel = "";
 token = "2.00N3nKPC1PogdB2764827977Zt7SXB";
 uid = 2056483717;
 userImage = "";
 },
 {
 success = 0;
 }
 
 
 
 */

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    
    
    
    NSString *token = (NSString *)[[NSUserDefaults standardUserDefaults]objectForKey:@"accessToken"];
    NSString *userID = (NSString *)[[NSUserDefaults standardUserDefaults]objectForKey:@"userID"];
	NSDictionary *dic = @{@"access_token": token,@"uid":userID};
    
    //获取微博内容
    [manager GET:@"http://lovemyqq.sinaapp.com/getUser.php" parameters:dic success:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"%@",responseObject);
        
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"%@",error);
    }];
}

@end
